package by.msokoloff.javaweb2015.services;

import java.util.List;

import javax.persistence.metamodel.SingularAttribute;

import org.springframework.transaction.annotation.Transactional;

import by.msokoloff.javaweb2015.datamodel.Registration;

public interface RegistrationService {

	Registration get(Integer id);

	List<Registration> getAll();

	@Transactional
	void createOrUpdate(Registration registration);

	@Transactional
	void delete(Registration registration);

	@Transactional
	void deleteAll();

	long getCount();

	List<Registration> getAll(SingularAttribute<Registration, ?> sortParam, boolean ascending, int first, int count);

}
